Skip to content

Conversation

@rossyman
Copy link

This PR implements async variants of mapValues and mapKeys.

Changes

  • New functions utilise limitAsync prior-art
    • Since this is effectively a wrapper around Semaphore, it may make more sense for this to live within /promise rather than /array
  • Added mapValuesAsync object sub-function
    • Identical to mapValues
    • Resolves the object upon completion of all inner promises
    • Accepts concurrency option for limitAsync
  • Added mapKeysAsync object sub-function
    • Identical to mapKeys
    • Resolves the object upon completion of all inner promises
    • Accepts concurrency option for limitAsync
  • Tests for mapValuesAsync and mapKeysAsync
  • Docs for mapValuesAsync and mapKeysAsync
    • LLM was used to generate the non-English documentation
    • Feel free to adjust as necessary to improve accuracy of generated docs

Benchmarking

  • Since Lodash does not natively support async mapping utilities, I could not benchmark against it
  • This is similar to the scenario faced by the other newly added async functions (mapAsync, filterAsync, etc)
  • It may be worth benchmarking asynchronous functions against popular libraries such as async going forward

@vercel
Copy link

vercel bot commented Nov 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
es-toolkit Ready Ready Preview Comment Dec 1, 2025 1:30pm

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

안녕하세요.
비동기 함수 관련 md를 잘 추가하셨네요.
다름이 아니라 "~니다" 체보다는 "~요"체를 사용하는 것은 어떠실까요?

image

다른 문서에서는 "~요"체를 사용하고 있어요!

-> 관련 경로
docs/ko/reference/object/mapKeysAsync.md
docs/ko/reference/object/mapValuesAsync.md

감사합니다.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

감사합니다.
말씀하신 "~요" 체 관련 피드백 반영해서 PR 업데이트했습니다.
추가로 수정 필요한 부분 있으시면 말씀 부탁드립니다.


Thanks for reviewing my changes! I've updated the PR to reflect your feedback on using "~yo" forms in the documentation. If you notice anything else that needs to be changed, let me know.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

@rossyman rossyman force-pushed the feat/async-object-mapping branch from 299d576 to b3938b7 Compare December 1, 2025 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants